package com.x.OrderInfo.controller;


import com.alibaba.nacos.shaded.org.checkerframework.checker.units.qual.A;
import com.x.OrderInfo.entity.OrderInfo;
import com.x.OrderInfo.service.OrderInfoService;
import com.x.order.service.RemoteOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author x-cloud
 * @since 2021-07-29
 */
@RestController
@RequestMapping("/OrderInfo/order-info")
public class OrderInfoController {

    @Autowired
    private OrderInfoService orderInfoService;
    @Autowired
    private RemoteOrderService remoteOrderService;

    public List<OrderInfo> list(){
        return  orderInfoService.list();
    }


    /**
     *
     * @return
     */
    @GetMapping("/getRemoteOrderDefault")
    public String getRemoteOrderDefault(){
        return remoteOrderService.getOrderDefault();
    }
}
